package cn.it.ygh.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.it.ygh.mapper.HouseApplyMapper;
import cn.it.ygh.pojo.Apply;
import cn.it.ygh.pojo.House;
import cn.it.ygh.pojo.Order;
import cn.it.ygh.service.HouseApplyService;

@Service(value = "HouseApplyService")
@Transactional
public class HouseApplyServiceImpl implements HouseApplyService{
	@Autowired
	private HouseApplyMapper houseApplyMapper;
	
	@Override
	public List<Order> getUnorderData(int pageStart,int pageSize,String agentAccount){
		return houseApplyMapper.getUnorderData(pageStart,pageSize,agentAccount);
	}
	@Override
	public int getUnorderTotal(String agentAccount){
		return houseApplyMapper.getUnorderTotal(agentAccount);
	}
	
	
	
	@Override
	public List<Apply> getUnapplyData(int pageStart, int pageSize,String agentAccount) {
		
		return houseApplyMapper.getUnapplyData(pageStart, pageSize,agentAccount);
	}
	@Override
	public int getUnapplyTotal(String agentAccount) {
		
		return houseApplyMapper.getUnapplyTotal(agentAccount);
	}
	
	
	
	@Override
	public List<House> getAuditingData(int pageStart, int pageSize,String agentAccount) {
		// TODO Auto-generated method stub
		return houseApplyMapper.getAuditingData(pageStart, pageSize,agentAccount);
	}
	@Override
	public int getAuditingTotal(String agentAccount) {
		// TODO Auto-generated method stub
		return houseApplyMapper.getAuditingTotal(agentAccount);
	}
	
	
	
	public void updateOrderList(Order order){
		houseApplyMapper.updateOrderList(order);
	}
	public void updateApplyList(Apply apply){
		houseApplyMapper.updateApplyList(apply);
	}
	@Override
	public House getHouseById(int houseId) {
		// TODO Auto-generated method stub
		return houseApplyMapper.getHouseById(houseId);
	}
	@Override
	public Apply getApplyById(int applyId) {
		// TODO Auto-generated method stub
		return houseApplyMapper.getApplyById(applyId);
	}
	@Override
	public void addOrder(Order order) {
		// TODO Auto-generated method stub
		houseApplyMapper.addOrder(order);
	}


	
	public void AuditingHouse(House house) {
		
		houseApplyMapper.AuditingHouse(house);
	}
	@Override
	public Order getOrderById(int orderId) {
		// TODO Auto-generated method stub
		return houseApplyMapper.getOrderById(orderId);
	}
	@Override
	public void dealSuccess(int houseId) {
		// TODO Auto-generated method stub
		houseApplyMapper.dealSuccess(houseId);
	}
	
}
